<?php
$rs = false;
switch($data[0]){
	case 'n':
//新连接

	case 'm':
//		消息
        ob_start();
        //Start YafApplication
        $param = json_decode($data[2],true);
        $param['Bridge'] = $fd;
        $yaf_request = new Yaf_Request_Simple('POST','Index','index','index',json_decode($data[2],true));
        $GLOBALS['Yaf']->getDispatcher()->dispatch($yaf_request);

        $rs = ob_get_clean();
        $rs=json_decode($rs);
		break;
	case 'c':
//		断开连接
		break;
}
//Start Handle rs
if(is_array($rs)){

}